import request from '@/utils/request.js';

/**
 * 获取文件格式和页数
 * @param {String} path 文件地址 
 */
export const getFilePage = (path) => {
	return request.get(`page`, {
		url: path
	}, {
		isPython: true
	})
}

/**
 * 加入待打印
 */
export const AjaxJionCart = (data) => {
	return request.post('Mini/ApiConnect/AjaxJionCart', data)
}

/**
 * 待打印列表
 */
export const getCartList = (data) => {
	return request.post('Mini/ApiConnect/CartAllList', data)
}

/**
 * 待打印加减 + 选择
 */
export const CartChangeInfo = (data) => {
	return request.post('Mini/ApiConnect/CartChangeInfo', data)
}

/**
 * 待打印全选反选
 */
export const CartChangeAll = (data) => {
	return request.post('Mini/ApiConnect/CartChangeAll', data)
}

/**
 * 删除待打印
 */
export const CartDelete = (data) => {
	return request.post('Mini/ApiConnect/CartDelete', data)
}

/**
 * 待打印结算
 */
export const SettleAccounts = (data) => {
	return request.post('Mini/ApiConnect/SettleAccounts', data)
}

/**
 * 提交订单
 */
export const CreatOrderInfo = (data) => {
	return request.post('Mini/ApiConnect/CreatOrderInfo', data)
}

/**
 * 获取纸张尺寸列表
 */
export const getPaperSizeList = (data) => {
	return request.post('Mini/ApiConnect/getPaperSizeList', data)
}

/**
 * 获取封面颜色列表
 */
export const getCoversColorList = (data) => {
	return request.post('Mini/ApiConnect/getCoversColorList', data)
}

/**
 * 获取封面内容列表
 */
export const getCoversContentList = (data) => {
	return request.post('Mini/ApiConnect/getCoversContentList', data)
}

/**
 * 获取装订封面列表
 */
export const getCoversList = (data) => {
	return request.post('Mini/ApiConnect/getCoversList', data)
}

/**
 * 获取装订方式列表
 */
export const getBindingList = (data) => {
	return request.post('Mini/ApiConnect/getBindingList', data)
}

/**
 * 获取文档打印价格
 */
export const getPrintDocPrice = (data) => {
	return request.post('Mini/ApiConnect/getPrintDocPrice', data)
}

/**
 * 修改待打印文档
 */
export const UpdateCart = (data) => {
	return request.post('Mini/ApiConnect/UpdateCart', data)
}